import apiClient from './apiClient';
import { NodeModulesScanResult } from '../../types';

export const cleanupService = {
  // 获取node_modules列表
  getNodeModules: async (): Promise<any[]> => {
    return await apiClient.get<any, any[]>('/cleanup/node_modules');
  },
  
  // 清理指定路径
  cleanPath: async (paths: string[], force: boolean = false): Promise<{success: boolean, errors?: any[]}> => {
    return await apiClient.delete<any, {success: boolean, errors?: any[]}>('/cleanup/path', {
      data: { paths, force }
    });
  },
};

export default cleanupService; 